package com.cyy.ultra_ptr_demo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.cyy.ultra_ptr_demo.avtivity.ListViewActivity;
import com.cyy.ultra_ptr_demo.avtivity.RecyclerActivity;
import com.cyy.ultra_ptr_demo.avtivity.RefreshActivity;
import com.cyy.ultra_ptr_demo.avtivity.StringActivity;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @InjectView(R.id.btn_listview)
    Button btnListview;
    @InjectView(R.id.btn_refresh)
    Button btnRefresh;
    @InjectView(R.id.btn_String)
    Button btnString;
    @InjectView(R.id.btn_recycler)
    Button btnRecycler;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.inject(this);
    }

    @OnClick({R.id.btn_listview, R.id.btn_refresh, R.id.btn_String,R.id.btn_recycler})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_listview:
                startActivity(new Intent(MainActivity.this, ListViewActivity.class));
                break;
            case R.id.btn_refresh:
                startActivity(new Intent(MainActivity.this, RefreshActivity.class));
                break;
            case R.id.btn_String:
                startActivity(new Intent(MainActivity.this, StringActivity.class));
                break;
            case R.id.btn_recycler:
                startActivity(new Intent(MainActivity.this, RecyclerActivity.class));
                break;
        }
    }

}
